package com.example.registerdemo.common;

import java.util.UUID;

public class UUIDUtils {

    public static String getUUID() {
        return UUID.randomUUID().toString().replace("-","");
    }

    public static String getCode(){
        return UUID.randomUUID().toString()
                .replaceAll("-", "")
//                .replaceAll("[a-z|A-Z]","")
                .substring(0, 6);
    }

    public static void main(String[] args) {
        System.out.println(getUUID());
        System.out.println(getCode());
    }
}
